package com.lry.netty01.rx;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import lombok.extern.slf4j.Slf4j;

/**
 * 实际的报文处理器
 */
@Slf4j
public class PacketHandler extends ChannelInboundHandlerAdapter {

    @Override
    public void channelActive(ChannelHandlerContext ctx)  {

    }



    @Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
        FixedFrame fixedFrame = (FixedFrame) msg;
        ctx.writeAndFlush(fixedFrame);
        System.out.println(fixedFrame);
    }


}
